package CRUD;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

import persistence.model.Personne;

public class TestC {

	/**
	 * 
	 */
	public static void main(String[] args) {
		Configuration config = new Configuration();
		SessionFactory sf = config.configure().buildSessionFactory();
		Session session = sf.openSession();
		session.beginTransaction();
		Personne personne = new Personne();
		personne.setNomPersonne("test");
		session.save(personne);
		session.getTransaction().commit();
		session.close();
	}
}
